﻿/*
 * ============ [ 废土 ] ============
 *
 * [ 维护者 ]  argoran@gmail.com
 * [  状态  ]  原型
 *
 * ============ [ 注释 ] ============
 *
 * 处理close指令的类
 *
 * ==================================
 */

using LastLandClient.Data;

namespace LastLandClient.Core.CmdInterpreter
{
    public class CCmdCloseClient : ICommandInterpreter
    {
        public void ExecuteCommand(string _cmd, string _args)
        {
            if (CData.client != null && CData.client.isClientOn())
            {
                CData.client.Close();
                CData.clientConnected = false;
                CData.client = null;

                CData.console.SendOutput("");
                CData.console.SendOutput("客户端关闭");
            }
            else
            {
                CData.console.SendOutput("");
                CData.console.SendOutput("客户端已经关闭");
            }
        }
    }
}
